package com.miao.controller.front;

import com.miao.service.OrderDetailService;
import com.miao.vo.ParttimeVo;
import com.miao.vo.ResultVo;
import com.miao.vo.UserVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: 丰
 * @date: 2023/3/2 18:00
 */
@RestController
@RequestMapping("/front/orderDetail")
@Api(tags = "订单详情接口")
public class OrderDetailController {
    @Autowired
    OrderDetailService orderDetailService;
    @GetMapping("/getOrderDetail/{OrderDetailId}")
    @ApiOperation("根据id查询订单详情")
    public ResultVo<ParttimeVo> getOrderDetailId(@PathVariable("parttimeId")Integer parttimeId){
       ResultVo resultVo = orderDetailService.getOrderDetailId(parttimeId);

        return resultVo;
    }
    @GetMapping("/editOrderDetail/{OrderDetailId}")
    @ApiOperation("根据id编辑订单详情")
    public ResultVo<ParttimeVo> editOrderDetailId(@PathVariable("parttimeId")Integer parttimId){
        ResultVo resultVo = orderDetailService.editOrderDetailId(parttimId);
        return resultVo;
    }
    @GetMapping("/deleteOrderDetail/{OrderDetailId}")
    @ApiOperation("根据id删除订单详情")
    public ResultVo<ParttimeVo> deleteOrderDetailId(@PathVariable("parttimeId")Integer parttimId){
        ResultVo resultVo = orderDetailService.deleteOrderDetailId(parttimId);
        return resultVo;



}

    }


